import request from '@/utils/request'

export const login = data => request({
  url: '/login',
  method: 'post',
  data
})

export const getOneAdminUserByToken = () => request({
  url: '/getOneAdminUserByToken',
  method: 'get'
})

export const getCosTempToken = () => request({
  url: '/getCosTempToken',
  method: 'get'
})

export const addOneAdminUser = (data) => request({
  url: '/addOneAdminUser',
  method: 'put',
  data: data || {}
})

export const resetAdminUserPassword = (data) => request({
  url: '/resetAdminUserPassword',
  method: 'patch',
  data: data || {}
})

export const updateOneAdminUserById = (data) => request({
  url: '/updateOneAdminUserById',
  method: 'patch',
  data: data || {}
})

export const getAdminUserList = (data) => request({
  url: '/getAdminUserList',
  method: 'post',
  data: data || {}
})
